If exists (select * from dbo. sysobjects where id = object_id (n' [tb_Holiday] ') and OBJECTPROPERTY (id, n'isusertable') = 1)
Drop table [tb_Holiday]
GO
-- Define holiday tableCreate table tb_Holiday (HDate smalldatetime primary key clustered, -- holiday periodName nvarchar (50) not null) -- holiday NameGO
If exists (select * from dbo. sysobjects where id = object_id (n' [dbo]. [f_WorkDay] ') and xtype in (n'fn', n'if', n'tf '))Drop function [dbo].
Today, I helped my colleagues find bugs in a function. The source code for me is as follows: if exists (select * from dbo. sysobjects where id = object_id (n' [tb_Holiday] ') and OBJECTPROPERTY (id, n' isusertable') = 1)
Drop table [tb_Holiday]
GO
-- Define holiday table
Create table tb_Holiday (
HDate smalldatetime primary key clustered, -- holiday period
Name nvarchar (50) not null) -- holiday Name
GO
If exists (select * from dbo. sysobjects where i
When running SQL statements, an error message is displayed. how can this problem be solved ;? Phpdate_default_timezone_set (AsiaShangHai); $ hdate (H: I: s); nbsp; $ jdate (Y-m-d); nbsp; $ kdate (Y-m-d nbsp; H: I: s); require_once (dbtools. inc. php); when running SQL statements, an error prompt is displayed.
Date_default_timezone_set ("Asia/ShangHai ");
$ H = date ("H: I: s ");
$ J = date ("Y-m-d ");
$ K = date ("Y-m-d H: I: s ");
// Require_once
information, including user name, name, gender, address, email, date of birth. For example {' username ': ' Chao ', ' name ': ' Hu Shulan ', ' sex ': ' M ', ' address ': ' Shawan Ningde Road in Ningxia Hui Autonomous Region ' t block 873713 ', ' Mail ': ' [email protected] ', ' Birt Hdate ': ' 1998-06-12 '}
Fake.profile (Fields=none, Sex=none): Detailed slightly personal information, more than a brief personal information about the com
table will be deleted5: Create a table with a constraint on the column (cannot be applied to the view)Two different waysCreating a Constraint in a Column specificationprocSQL;Create Table Work. Employees/ * Follow the restrictions directly after the variable * / (IDChar(5)Primary Key, NameChar(Ten), GenderChar(1) not NULL Check(Genderinch('M','F'), hdate date label='Hire Date');Creating a Constraint by Using a Constraint specificationprocSQL;Create
left Fill Select Rpad (Salary, ' ') from employees;Results 2600 left Fill Select Trim (' H ' from ' HHLLWOHLDHH ') from dual; Results llwohld go to the middleDigital control Round,trunc,modSelect Round (45.36954,4) from dual;45.3695 Rounding Select Trunc (45.36954,3) from dual;45.369 truncate SELECT mod (1600,300) from dual; 100 seeking remainderDate control date can only be added minus Months_betwwen,add_months,next_day,last_dayTwo date subtraction returns the difference between a date days
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.